package cn.joker.constant;

import lombok.Data;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@Data
public class RpaData {
    //PRA异动单号
    private String rpaId;

    //PRA申请时间
    // @JsonFormat(pattern = "yyyy-MM-dd")
    // @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date rpaApplicantTime;

    //RPA停电时间
    // @JsonFormat(pattern = "yyyy-MM-dd")
    // @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date rpaPowerCutTime;

    //新加申请人
    private String rpaApplicantName;

    //申请人联系电话
    private String rpaApplicantPhone;

    //单位
    private String yxdw;

    public RpaData(List<Object> data) throws ParseException {
        this.rpaId = data.get(0).toString();
        this.rpaApplicantTime = new SimpleDateFormat("yyyy-MM-dd").parse(data.get(1).toString());
        this.rpaPowerCutTime = new SimpleDateFormat("yyyy-MM-dd").parse(data.get(2).toString());
        this.rpaApplicantName = data.get(3).toString();
        this.rpaApplicantPhone = data.get(4).toString();


    }
}
